/*
 * @Author: 李灿
 * @Date: 2020-11-06 16:44:12
 * @LastEditTime: 2021-07-28 18:39:15
 * @Description:宏任务微任务执行方式
 * @FilePath: /javascript/meetings/0.总结/8.js
 */
console.log(1);

setTimeout(() => {
  console.log(2);
});

new Promise((resolve) => {
  console.log(5); // console 写在 resolve 前或者 resolve 之后都是一样的
  resolve();
  console.log(6);
}).then(() => {
  console.log(7);
});

Promise.resolve().then(() => {
  console.log(8);
});

// 1 5 6 7 8 2
